Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /
Chapter 2 - Core Printing Features / Core Printing Features Reference
Functions / Creating and Managing Job Objects


GXFlattenJobToHdl

You can use the GXFlattenJobToHdl function to flatten a job object into a handle.

Handle GXFlattenJobToHdl (gxJob aJob, Handle aHandle);
aJob
A reference to the job object to be flattened.
aHandle
The handle into which the flattened data is placed.
function result
The handle into which the flattened data is placed.
DESCRIPTION
The GXFlattenJobToHdl function provides your application with a mechanism for saving all information associated with a job object in a handle. You should call this function when a user saves a printable document.

You specify a handle in the aHandle parameter. QuickDraw GX grows or shrinks the size of the handle you provide to accommodate the size of the job object. You can specify nil in this parameter to allow QuickDraw GX to create and return a handle for you.

When you save a printable document, you can write the handle to the file's resource or data fork. You cannot directly modify the contents of this handle.

When a user opens a printable document, you need to unflatten all information associated with a job object using the UnflattenJobToHdl function.

If you do not wish to save data in a handle, you can also use the GXFlattenJob and GXUnflattenJob functions to specify a function to save and restore a job object.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found, or there was not enough memory to load it.
SEE ALSO
Listing 2-7 on page 2-25 shows how to use the GXFlattenJobToHdl function to save a job object.

To unflatten all information associated with a job object, see the GXUnflattenJobFromHdl function, which is described on page 2-58.

You can also specify a function to save information associated with a job object by using the GXFlattenJob function, which is described in the next section.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help